<script type="text/javascript" src="<?php echo $this->config->item('base_url').$this->config->item('template'); ?>scripts/slide/easySlider1.5.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('base_url').$this->config->item('template'); ?>scripts/slide/jquery.cycle.all.2.74.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $('#tabs-news').tabs({ fxFade: false, fxSpeed: 'fast' });
        $('#group').tabs({ fxFade: false, fxSpeed: 'fast' });
        $('#shop-ranking').tabs({ fxFade: false, fxSpeed: 'fast' });
        $('#search-tabs').tabs({ fxFade: false, fxSpeed: 'fast' });
        $("#slider").easySlider({
            auto: false,
            continuous: true 
        });
        $('.home1').cycle({ 
            fx:    'shuffle', 
            sync:   0, 
            delay: -4000 
        });
        $('.home3').cycle({ 
            fx:    'scrollDown', 
            sync:   0, 
            delay: -4000 
        });
        $('.home2').cycle({ 
            fx:    'fade', 
            speed:  5500 
        });
        
        

    });
    function openMenu(){
        $("#tabs-active").css('display', 'block');
        $("#tabs-none").css('display', 'none');
        //        if ($("#tabs-active").css('display') == 'none'){
        //            $("#tabs-active").css('display', 'block');
        //            $("#tabs-none").css('display', 'none');
        //        } else {
        //            $("#tabs-none").css('display', 'block');
        //            $("#tabs-active").css('display', 'none');
        //        }
    }
    function closeMenu(){
        $("#tabs-none").css('display', 'block');
        $("#tabs-active").css('display', 'none');
    }
    function loadWare(option, catid){
        if (option == '1'){
            $("#a_new_update_" + catid).html("<strong>Mới nhất</strong>");
            $("#a_min_price_" + catid).html("Rẻ nhất");
            $("#warehouse_new_update_" + catid).css('display', 'block');
            $("#warehouse_min_price_" + catid).css('display', 'none');
        } else {
            $("#a_new_update_" + catid).html("Mới nhất");
            $("#a_min_price_" + catid).html("<strong>Rẻ nhất</strong>");
            $("#warehouse_new_update_" + catid).css('display', 'none');
            $("#warehouse_min_price_" + catid).css('display', 'block');
        }

    }
</script>
<script type="text/javascript">
    $(document).ready( function(){	
        var buttons = { previous:$('#lofslidecontent45 .lof-previous') ,
            next:$('#lofslidecontent45 .lof-next') };
						
        $obj = $('#lofslidecontent45').lofJSidernews( { interval : 4000,
            direction		: 'opacity',	
            easing			: 'easeOutBounce',
            duration		: 2400,
            auto		 	: true,
            mainWidth:500,
            buttons			: buttons} );	
    });
</script>
<script language="javascript" type="text/javascript" src="<?php echo $this->config->item('base_url').$this->config->item('template'); ?>scripts/slide/jquery.easing.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->config->item('base_url').$this->config->item('template'); ?>scripts/slide/slidescript.js"></script>

<div class="f-w100 m-15">
    <div class="dm">

        <h3 class="dm-title">DANH MỤC SẢN PHẨM</h3>
        <ul class="ul-main">
			<?php 
				foreach ($cateshow as $row)
				{
			?>
            <li class=""><a href="<?php echo $this->config->item('base_url'); ?>index.php/cate/index/<?php echo $row->cateid ?>"><?php echo $row->catename ?></a>
                <ul class="ul-main">
					<?php 
					$this->load->model('news_model');
					$cate2=$this->news_model->cateshow($row->cateid1);
					$flag=true;
					foreach ($cate2 as $row1){?>
                    <li class="<?php if($flag){echo "dm_sub_begin";}?>"><a href="<?php echo $this->config->item('base_url'); ?>index.php/cate/index/<?php echo $row1->cateid ?>"><?php echo $row1->catename ?></a></li>
					<?php } ?>
                </ul>
            </li>
			<?php } ?>
            <li class="dm-end" id="tabs-none"><a href="javascript:void(0)" id="tabs-c" onclick="openMenu()"><img src="<?php echo $this->config->item('base_url').$this->config->item('template'); ?>images/dm-show.gif" alt="Xem thÃªm danh má»¥c" /></a></li>            
        </ul>
        <ul class="ul-main ul-click" id="tabs-active" style="display:none;">
			<?php 
				foreach ($catehide as $row)
				{
			?>
            <li class=""><a href="<?php echo $this->config->item('base_url'); ?>index.php/cate/index/<?php echo $row->cateid ?>"><?php echo $row->catename ?></a>
                <ul class="ul-main">
					<?php 
					$this->load->model('news_model');
					$cate2=$this->news_model->catehide($row->cateid1);
					foreach ($cate2 as $row1){?>
                    <li class="<?php if($flag){echo "dm-sub-begin";}?>"><a href="<?php echo $this->config->item('base_url'); ?>index.php/cate/index/<?php echo $row1->cateid ?>"><?php echo $row1->catename ?></a></li>
					<?php } ?>
                </ul>
            </li>
			<?php }?>   
            <li class="dm-end"><a href="javascript:void(0)" onclick="closeMenu()"><img src="<?php echo $this->config->item('base_url').$this->config->item('template'); ?>images/dm-close.gif" alt="Thu gá»�n danh má»¥c" /></a></li>
        </ul>
    </div>
    <!--END danh muc sp-->

    <div class="slide-hgdan"> 
        <div class="slide-c">
            <div id="lofslidecontent45" class="lof-slidecontent" style="width:500px; height:209px;">
                <div class="preload"><div></div></div>
                <div class="lof-main-outer" style="width:500px; height:209px;">
                    <div onclick="return false" href="" class="lof-previous">Quay lại</div>
						<ul class="lof-main-wapper">
							<?php 
								foreach ($banner as $row)
								{
							?>
							<li>
								<a target="_parent" title="<?php echo $row->bannername; ?>" href="<?php echo $this->config->item('base_url'); if($row->cateid>0){ ?>index.php/cate/index/<?php echo $row->cateid;} ?>" target="_blank"><img src="<?php echo $this->config->item('base_url');echo $row->imgpath; ?>" title="<?php echo $row->bannername; ?>" ></a> 
							</li> 
							<?php }?>
                        </ul>  	
                    <div onclick="return false" href="" class="lof-next">Tiếp</div>
                </div>
            </div> 
            <script type="text/javascript">
				
            </script>		
        </div>
        <!--END slide-->
        <div class="hgdanindex"> 
            <div id="J_SubPromotion" class="sub-promotion">

                <div class="sp-hd">
                    <h3></h3>
                    <!--<span class="txt-indicator"><em>1-3</em>/5</span>
                    <a class="sp-prev disable" href="javascript:void(0);"></a>
                    <a class="sp-next" href="javascript:void(0);"></a>-->
                </div>

                <div class="sub-promotion-content" style="position: relative;">
                    <div class="ks-switchable-content zoom" style="position: absolute; top: 0px;">
                        <ul class="con-of-3" style="display:inline;padding:0;margin:0;">
							<?php 
								foreach ($newhot as $row)
								{
							?>
                            <li>
                                <a target="_blank" href="<?php echo $this->config->item('base_url'); if($row->cateid>0){ ?>index.php/cate/index/<?php echo $row->cateid;} ?>" target="_blank" title="<?php echo $row->bannername; ?>"><img height="57" width="250" src="<?php echo $this->config->item('base_url');echo $row->imgpath; ?>" title="<?php echo $row->bannername; ?>" alt="<?php echo $row->bannername; ?>"></a>
                            </li>
							<?php }?>					
                        </ul>
                    </div>			
                </div>		
                <ul class="ks-switchable-nav"><li class="ks-active">1</li><li class="">2</li></ul></div>
        </div>

        <!--END hg dan-->
    </div>
    <!--END slide + hg dan-->
    <div class="ads-t">

    </div>

    <!--END ads top-->
</div>